from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By

from selenium.webdriver.common.keys import Keys

driver = webdriver.Chrome()
driver.maximize_window()
driver.get("file:////Users/minyang/local/work/PycharmProjects/git/learn/week34/webautotest/page/sendkeys.html")
driver.find_element(By.ID,'A').send_keys((Keys.COMMAND,'a'))
driver.find_element(By.ID,'A').send_keys((Keys.COMMAND,'x'))
sleep(2)
driver.find_element(By.ID,'B').send_keys((Keys.COMMAND,'v'))
sleep(2)
driver.find_element(By.ID,'B').send_keys((Keys.COMMAND,'a'))
driver.find_element(By.ID,'B').send_keys((Keys.COMMAND,'c'))
sleep(2)
driver.find_element(By.ID,'A').send_keys((Keys.COMMAND,'v'))
sleep(2)
driver.quit()

